﻿@using MvcApplication1.Controllers
@model TreeExample2Arg

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>title</title>
    <style type="text/css">
        .Container_te014 {
            padding: 0;
            margin: 0;
        }

            .Container_te014 li {
                list-style-type: none;
            }


        /* indent for all tree children excepts root */
        .Node_te013 {
            background-image: url(Content/themes/base/images/tree/i.gif);
            background-position: top left;
            background-repeat: repeat-y;
            margin-left: 18px;
            zoom: 1;
        }

        .IsRoot_te015 {
            margin-left: 0;
        }


        /* left vertical line (grid) for all nodes */
        .IsLast_te007 {
            background-image: url(Content/themes/base/images/tree/i_half.gif);
            background-repeat: no-repeat;
        }

        .ExpandLeaf_te003 > .Expand_te001 {
            background-image: url(Content/themes/base/images/tree/expand_leaf.gif);
            cursor: auto;
        }

        .ExpandOpen_te004 > .Expand_te001 {
            background-image: url(Content/themes/base/images/tree/expand_minus.gif);
        }

        .ExpandClosed_te005 > .Expand_te001 {
            background-image: url(Content/themes/base/images/tree/expand_plus.gif);
        }

        .Content_te012 {
            min-height: 18px;
            margin-left: 18px;
            cursor: pointer;
        }

        * html .Content_te012 {
            height: 18px;
        }
    
        .Selected_te016 {
            background-color: rgb(162, 175, 202);
            cursor: auto;
        }

        .Expand_te001 {
            width: 18px;
            height: 18px;
            float: left;
        }


        .ExpandOpen_te004 .Container_te014 {
            display: block;
        }

        .ExpandClosed_te005 .Container_te014 {
            display: none;
        }

        .ExpandOpen_te004 > .Expand_te001, .ExpandClosed_te005 > .Expand_te001 {
            cursor: pointer;
        }

        .ExpandLoading_te010 {
            width: 18px;
            height: 18px;
            float: left;
            background-image: url(Content/themes/base/images/tree/expand_loading.gif);
        }
    </style>
</head>
<body>
    @Html.Partial("TreeChildren", new TreeChildrenArg(Model.Items))
    <input id="button1" type="button" value="0/4/6/7" />
    <input id="button2" type="button" value="0/11" />
    <input id="button3" type="button" value="13" />
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/Scripts/jquery.ba-bbq.js")
    @Scripts.Render("~/Scripts/JavaScript1.js")
    <script>
        $(function () {
            te006('@Url.Action("TreeChildren")');
            jumpToBy("#button1", ["0", "4", "6", "7"]);
            jumpToBy("#button2", ["0", "11"]);
            jumpToBy("#button3", ["13"]);
        });

        function jumpToBy(buttonId, nodeIds) {
            $(buttonId).click(
                function () {
                    jumpTo_te017('@Url.Action("TreeChildren")', nodeIds);
                });
        }
    </script>
</body>
</html>
